<extend name="common:commonTemplate" />
<block name="main_content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="index.html"
				data-original-title="Go to Home"><i class="icon-home"></i> 首页</a> <a
				href="#">页面资源管理</a> <a class="current" href="#">新增市</a>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-info-sign"></i>
						</span>
						<h5>新增市</h5>
					</div>
					<div class="widget-content nopadding">
						<form novalidate="novalidate" id="basic_validate"
							name="basic_validate" action="#" method="post"
							class="form-horizontal">
							<div class="control-group">
								<label class="control-label">省名称：</label>
								<div class="controls">
									<select id="province_id" >
									   <volist name="lst_province" id="province">
											<option value="{$province.province_id}">{$province.province_id}->{$province.province_name}</option>
										</volist>
									</select>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">市名称</label>
								<div class="controls">
									<input type="text" id="city_name" name="city_name"/>
								</div>
							</div>
					
							<div class="control-group">
								<a id="btn_addcity" class="btn btn-success">新增市</a> 
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</block>

<block name="js_content"> <script>
		//新增页面资源管理
		$('#btn_addcity').bind('click', function(){
			var province_id = $('#province_id').val();
			var city_name = $('#city_name').val();
			var result = CityListService.AddCity(province_id,city_name);
			if (result.IsSuccess == 0) {
				alert(result.ErrorMsg);
				return;
			} else {
				alert('操作成功');
				$('#promoter_status').text('有效');
			}
		});
</script> </block>